#!/usr/bin/python3
#Atuhor:zeroone
# -*- coding: utf-8 -*-
# @Author   : zeroone


from requests import get
import random
import json
import time
from requests.exceptions import RequestException

baseUrl = 'https://api-q.fx678img.com/histories.php?symbol=LMCI&limit=100&resolution=D&codeType=5210&st=0.8122843826306168'


def get_html():
    headers = {
        'User-Agent':
        'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36'
    }

    # print(url)
    try:

        resp = get(baseUrl, headers=headers)
        print(resp.status_code)
        if resp.status_code == 200:
            # print(resp.content)
            return resp.text
        print("没有爬取到相应的内容")
        return None
    except RequestException:
        print("没有爬取到相应的内容")
        return None





if __name__ == '__main__':


    datas = get_html()
    print(datas)
    print('\n列表爬取成功!')